- @html_title ||= @project.name
- html_buttons do
  - if current_user.admin?
    = link_to '编辑', edit_project_path(@project), class: 'btn btn-primary btn-sm push-10-r'
  = link_to '返回列表', projects_path, class: 'btn btn-info btn-sm push'
.border-black-op-b
  |操作:
.push-10-t
  = link_to_dialog '全流程重启', do_project_path(@project, command: 'full-restart'), class: 'btn btn-primary'
  = link_to '更新进程&分支信息', do_exec_project_url(@project, command: 'fetch'), remote: true, method: :patch, class: 'btn btn-info push-10-l'
table.table.table-bordered.push-10-t
  tr
    th Name:
    td= @project.name
    th url:
    td= link_to @project.visit_url, @project.visit_url, target: '_blank'
  tr
    th Notes:
    td= @project.notes
.row
  .col-md-12.push-20-t.push-20 style='line-height: 25px;word-spacing: 3px;'
    .border-black-op-b
      | 进程状态
      |（
      = @project.status_text_time.label
      |）
    pre
      == @project.status_text
  .col-md-6
    .border-black-op-b
      |分支:
    .row.branch-infos
      .col-md-6
        p local:
        .row.branch-list
          - @project.branch_info[:local].each do |b|
            - current = (b==@project.branch_info[:current])
            .col-md-12 class="#{'text-success' if current }"
              = b
              = link_to_dialog (current ? '更新' : '切换'),
                      do_project_path(@project, command: 'checkout', branch: b),
                      class: 'btn btn-xs btn-primary push-10-t pull-right'
      .col-md-6
        p remote:
        .row.branch-list
          - @project.branch_info[:remote].each do |b|
            - current = (b==@project.branch_info[:current])
            .col-md-12 class="#{'text-success' if current}"
              = b
              = link_to_dialog (current ? '更新' : '切换'),
                      do_project_path(@project, command: 'checkout', branch: b, branch_remote: true),
                      class: 'btn btn-xs btn-primary push-10-t pull-right'
  .col-md-6
    .border-black-op-b
      |Logs:
    .project-show-page-log-block
      table.table.project-show-page-log
        - @project.operation_logs.includes(:user).order(id: :desc).limit(10).each do |l|
          tr
            td=l.command_name
            td=l.user
            td=l.created_at.label
